package com.ebeijia.scrollerviewgroup;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Toast;

import com.ebeijia.scrollerviewgroup.widget.ScrollerViewGroup;

public class MainActivity extends AppCompatActivity {

    ScrollerViewGroup scrollerViewGroup;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        scrollerViewGroup = (ScrollerViewGroup) findViewById(R.id.scrollerViewGroup);
    }

    boolean isMove = false;

    public void move(View view) {
        if (!isMove) {
            scrollerViewGroup.smoothScrollTo(-400, -400);
            isMove = true;
        } else {
            scrollerViewGroup.smoothScrollTo(0, 0);
            isMove = false;
        }
    }

    public void hereClick(View view) {
        Toast.makeText(this, "HERE CLICK", Toast.LENGTH_SHORT).show();
    }
}
